//酒企信息

import request from '@/utils/request'

// 更新酒企状态
export function updateWineryStatus(pageParam) {
  return request({
    url: '/gscloud_winery/winery/winery/updateWineryStatus',
    method: 'put',
    params: pageParam
  })
}

// 更新酒企的审核状态
export function updateStatus(pageParam) {
  return request({
    url: '/gscloud_winery/winery/winery/updateStatus',
    method: 'put',
    params: pageParam
  })
}

// 获取所有的酒企信息分页查询
export function page(pageParam) {
  return request({
    url: '/gscloud_winery/winery/winery/listWinery',
    method: 'get',
    params: pageParam
  })
}

// 获取所有的酒企审核分页查询
export function page_audit(pageParam) {
  return request({
    url: '/gscloud_winery/winery/winery/page',
    method: 'get',
    params: pageParam
  })
}

//酒企信息条件查询
export function list(pageParam) {
  return request({
    url: '/gscloud_winery/winery/winery/list',
    method: 'get',
    params: pageParam
  })
}

// 获取酒企详细信息
export function winery(wineryId) {
  return request({
    url: '/gscloud_winery/winery/winery/detail',
    method: 'get',
    params:{
      wineryId
    }
  })
}

// 酒企录入->保存酒企和签约酒类spu信息
export function save(data) {
  return request({
    url: '/gscloud_winery/winery/winery/save',
    method: 'post',
    data
  })
}

// 酒企信息编辑
export function update(data) {
  return request({
    url: '/gscloud_winery/winery/winery/update',
    method: 'put',
    data
  })
}

// 删除平台用户信息
export function deleteById(wineryId) {
  return request({
    url: '/gscloud_winery/winery/winery',
    method: 'delete',
    params:{
      wineryId
    }
  })
}
